package com.example.conp;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MySqlit extends SQLiteOpenHelper {

    private static final String DATABASE_NAME = "stu";  //数据库名
    private static final int DATABASE_VERSION = 1;

    public MySqlit(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }
    /*public MySqlit(Context context) {

        //super(context,DATABASE_NAME ,null, DATABASE_VERSION);
        super(context,"stu",null, 1);
    }*/

    @Override
    public void onCreate(SQLiteDatabase db)
    {    String sql="create table Stu(_id integer primary key autoincrement,text name,text nnum,integer age)";

         db.execSQL(sql);

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }


}
